dgb(Phase-B): SSOT think() Phase-5 best-share punish walk + non-circular KAT - #378
Merged
Conversation
frstrtr
force-pushed
the
dgb/think-p5-best-share-punish
branch
from
June 23, 2026 17:06
99845dc to
8f2f1e8
Compare
frstrtr
force-pushed
the
dgb/think-p5-best-share-punish
branch
2 times, most recently
from
June 23, 2026 20:47
ecbaa84 to
95d5379
Compare
frstrtr
force-pushed
the
dgb/think-p5-best-share-punish
branch
2 times, most recently
from
June 23, 2026 23:27
d9a3062 to
300ef63
Compare
…lar KAT Lift the open-coded think() Phase-5 best-share resolution from share_tracker.hpp into a header-only SSOT (think_p5_best_share_punish.hpp): walk back off a naughty decorated head, dive to the deepest non-naughty descendant (skipping naughty children, 20-gen bound), and report the punishment of the share finally landed on, per p2pool data.py:2142-2166. FENCED/additive: dgb tree only, share_tracker.hpp NOT yet rewired (the byte-identity delegation is the follow-on). Pure graph traversal, consensus value semantics unchanged. KAT 6/6 with hand-derived non-circular fake-chain anchors; registered in CMake and both build.yml --target allowlist sites (#143 NOT_BUILT guard).
frstrtr
force-pushed
the
dgb/think-p5-best-share-punish
branch
from
June 24, 2026 00:45
300ef63 to
ca6e6de
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Phase-B pillar — think() Phase-5 best-share punish walk SSOT
Lifts the open-coded think() Phase-5 best-share resolution from
share_tracker.hppinto a header-only SSOTsrc/impl/dgb/think_p5_best_share_punish.hpp. This is the last un-lifted think() region after P1/P2/P3/P4/P6.What it pins (vs oracle p2pool
data.py:2142-2166)prevpointers.punish_val= the naughty count of the sharebest_idxfinally points at (0 unless stopped ON a naughty share).Isolation / scope
share_tracker.hppis per-coin (not shared core) and is NOT yet rewired — the byte-identity delegation is the follow-on, matching the P1/P3/P4 cadence.Proof
dgb_think_p5_best_share_punish_test6/6 green. Expectations are hand-derived by tracing the walk rules over hand-built fake chains (non-circular — not read back from the subject): non-naughty head, invalid-start skip, walk-back+dive-to-deepest, dive-skips-naughty-children, missing-prev punish, null-prev punish.src/impl/dgb/test/CMakeLists.txtand bothbuild.yml--targetallowlist sites (ci: build test_dgb_subsidy in both Linux test jobs (fix master-red NOT_BUILT) #143 NOT_BUILT guard).No self-merge — integrator taps after full-rollup CI green.